<ion-header>
  <ion-toolbar class="orange-bar">
    <ion-buttons slot="start">
      <ion-button color="light" (click)="goBack()">
        <ion-icon name="ios-arrow-back"></ion-icon>
      </ion-button>
    </ion-buttons>
    <ion-title>密码登录</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
  <form [formGroup]="formModel">
    <ion-radio-group formControlName="userType" text-center class="type-box">
      <label>个人 <ion-radio [value]="1"></ion-radio></label>
      <label>企业 <ion-radio [value]="2"></ion-radio></label>
    </ion-radio-group>
    <ion-list>
      <ion-item>
        <ion-input formControlName="mobile" placeholder="请输入手机号码" type="number" maxlength="11"></ion-input>
      </ion-item>
      <ion-item>
        <ion-input formControlName="password"
                   placeholder="请输入登录密码"
                   [type]="pwdObj.inputType" maxlength="20">
        </ion-input>
        <ion-icon slot="end" [name]="pwdObj.icon" [color]="pwdObj.color" (click)="showPassword()" style="z-index: 1"></ion-icon>
      </ion-item>
      <ion-item lines="none">
        <a slot="start" style="font-size: 14px" [routerLink]="['/registry']">没有账号?快速注册</a>
        <a slot="end" style="font-size: 14px" [routerLink]="['/retrieve-password']">忘记密码?</a>
      </ion-item>
    </ion-list>

    <div text-center>
      <a text-center class="link-btn bg-orange" [class.disabled]="!this.formModel.valid" (click)="doLogin()">确认登录</a>
    </div>
  </form>
</ion-content>
